﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BookStore.Data;
using System.Data;

namespace BookStore.Bussiness
{
    public class catogoryService
    {
        #region getbyID

        //public static DataTable getbyID(int catogoryID);

        public static catogoryInfo getbyID(int catogoryID)

        {
            return catogoryController.getbyID(catogoryID);
        }
        #endregion

        #region getAll
        public static DataTable getAll() {
            return catogoryController.ListCatogory();
        }
        #endregion

        #region insert
        public static bool insertCatogory(catogoryInfo objCatogory) {
            return catogoryController.insertCatogory(objCatogory);
        }
        #endregion

        #region update
        public static bool updateCatogory(catogoryInfo objCatogory) {
            return catogoryController.updateCatogory(objCatogory);
        }
        #endregion

        #region delete
        public static bool deleteCatogory(int catogoryID) {
            return catogoryController.deleteCatogory(catogoryID);
        }
        #endregion

        public static bool checkExist(int catogoryID) 
        {
            return catogoryController.checkExist(catogoryID);
        }

        //public static bool checkExist(string catogoryID) 
        //{
        //    return catogoryController.checkExist(catogoryID);
        //}
        #region checkCatogoryID
        //public static bool checkCatogoryID(int catogoryID) {
        //    return catogoryController.checkCatogoryID(catogoryID);
        //}

       
        public static DataTable Get_catalogALL()
        {
            return catogoryController.Get_catalogALL();
        }
        public static DataTable Get_catalogID(int id)
        {
            return catogoryController.Get_catalogID(id);
        }

        #endregion

    }
}
